package edu.msg.jthr.backend.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "INTERVIEWS")
public class Interview extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@OneToOne
	@JoinColumn(name = "USER_ID")
	private User user;
	@OneToOne
	@JoinColumn(name = "CANDIDATE_ID")
	private Candidate candidate;
	@Temporal(TemporalType.DATE)
	private Date date;
	private Comment feedBack;

	public Interview() {
	}

	public Interview(Long id, String uuid, User user, Candidate candidate,
			Date date, Comment feedBack) {
		super(id, uuid);
		this.user = user;
		this.candidate = candidate;
		this.date = date;
		this.feedBack = feedBack;	}

	public Comment getFeedBack() {
		return feedBack;
	}

	public void setFeedBack(Comment feedBack) {
		this.feedBack = feedBack;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Candidate getCandidate() {
		return candidate;
	}

	public void setCandidate(Candidate candidate) {
		this.candidate = candidate;
	}

	public Date getDate() {
		return date == null ? null : (Date) date.clone();
	}

	public void setDate(Date date) {
		this.date = date;
	}
}
